home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / dfÜ / bbs / aptbbs1 / apt / docs / aptcontrol.doc < prev    next >
Encoding:
Text File  |  1995-12-08  |  64.4 KB  |  3,087 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                               APTCONTROL.HYPER
  7.  
  8.  
  9.                                   Version
  10.                                    1.00b
  11.  
  12.  
  13.  
  14.  
  15.                                  Andy Grifo
  16.  
  17.  
  18.  
  19.                               ApT-Design 1995
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                         Generated with Heddley v1.1
  37.                      Heddley v1.1 (C) Edd Dumbill 1994
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                                  - Page 1 -
  77.  
  78.  
  79.  
  80. 1.    MAIN
  81.  
  82.                       ApT-BBS Control.library Guide
  83.  
  84.                       Copyright (c) 1995 ApT-Design
  85.  
  86.  
  87.               Developers Guidelines                           
  88.               Which Editor? - aid on picking a text-editor    
  89.               Library Comamnds                                
  90.               ApTLib.lib link-time library commands           
  91.               A word about the ApTClassicDefs.h file          
  92.               Contacting Technical Support                    
  93.  
  94. 2.    APTLINKLIB
  95.  
  96.  
  97.                          ApT-BBS ApTLib.lib List
  98.  
  99.  
  100. This is a link-time library - That is, it is not a actual .library but
  101. rather a collection of useful functions that should normally be linked with
  102. all of your projects, thus giving access to functions that will make
  103. developing easier than without.  As a small example, the DMsgf command is
  104. just the same as the standard printf() command but allows passing of
  105. formatted arguments which could not be done 'easily' with the standard
  106. DMsg() .library command.
  107.  
  108.  
  109.  
  110.   DMsgf(str,args)       .... Formatted printing, like printf()
  111.   EPstr(prompt,args)    .... EasyPrompt, string related
  112.   EPdec(decimal,args)   .... EasyPrompt, decimal related
  113.   GetYesNo(flag)        .... Yes/no calls made easier
  114.  
  115. 3.    DMSGF
  116.  
  117.  NAME:
  118.  
  119.     DMsgf(string,arguments)
  120.  
  121. FUNCTION:
  122.  
  123.     Allows the displaying of text with the additional power of using
  124.     formatting codes much the same way as the printf() command works.
  125.  
  126. EXAMPLE:
  127.  
  128.     WORD xval=20,yval=15;
  129.  
  130.     DMsgf("The X value=%ld and the Y value=%ld\n",xval,yval);
  131.  
  132.     "The X value=20 and the Y value=15"
  133.  
  134. SEE-ALSO:
  135.  
  136.    DMsg()
  137.  
  138. 4.    EPSTR
  139.  
  140.  NAME:
  141.  
  142.     EPstr(prompt,args)
  143.  
  144. FUNCTION:
  145.  
  146.  
  147.                                  - Page 2 -
  148. 4.    EPSTR
  149.  
  150.     A form of EasyPrompt'ing made even easier, but mainly for uses when
  151.     only a string is required to be returned back.
  152.  
  153.     You pass a string which is to act as the default "string" which then
  154.     may be changed by the user. Upon accepting the new string by the
  155.     pressing of return, the string is then returned back.
  156.  
  157.     You also pass arguments which contain the remainder of the
  158.     initiating required to make EasyPrompt filter the required items,
  159.     as well as setup the length of the user-editable prompt.
  160.  
  161. EXAMPLE:
  162.  
  163.      DMsg("\n\nEnter the handle that you wish to use on this system.\n:");
  164.      DotIt(14);
  165.      strcpy(udat->us_alias,EPstr(udat->us_alias,"LEN=30 LETTER NUMBER"));
  166.  
  167. SEE-ALSO:
  168.  
  169.    EPdec() EasyPrompt()
  170.  
  171.  
  172. 5.    EPDEC
  173.  
  174.  NAME:
  175.  
  176.     EPdec(decimal,args)
  177.  
  178. FUNCTION:
  179.  
  180.     A form of EasyPrompt'ing made even easier, but mainly for uses when
  181.     only a decimal/integer value is required to be returned back.
  182.  
  183.     You pass the decimal function which is to act as the initial
  184.     outputted value which then may be changed by the user. Once
  185.     the user has finished with the value the result is returned
  186.     back in decimal.
  187.  
  188.     You also pass arguments which contain the remainder of the
  189.     initiating required to make EasyPrompt filter the required items,
  190.     as well as setup the length of the user-editable prompt.
  191.  
  192. EXAMPLE:
  193.  
  194.     udat->us_scrlen = (UBYTE)EPdec(udat->us_scrlen,"LEN=2 NUMBER");
  195.  
  196.  
  197. SEE-ALSO:
  198.  
  199.    EPstr() EasyPrompt()
  200.  
  201.  
  202. 6.    GETYESNO
  203.  
  204.  NAME:
  205.  
  206.     GetYesNo(flag)
  207.  
  208. FUNCTION:
  209.  
  210.     It is often required to get a responce prompt from the user in the
  211.     form of a Yes or No. It is also sometimes required to have the
  212.     return key act as a 'default' to either call Yes or No depending
  213.     on what is required - The function also displays the text "Yes"
  214.     or "No" leaving you to bother about the return value only.
  215.  
  216. EXAMPLE:
  217.  
  218.     /*
  219.  
  220.                                  - Page 3 -
  221. 6.    GETYESNO
  222.  
  223.     ** In this example we default to NO (false being the call flag)
  224.     **/
  225.     DMsgf("\n\nDo you wish to search for files since your last call? [y/N]
  226. =>");
  227.  
  228.     if(GetYesNo(FALSE))
  229.     {
  230.       ... user selected YES
  231.     }
  232.     else
  233.     {
  234.       ... user selected NO
  235.     }
  236.  
  237.     /*
  238.     ** Here we default to YES
  239.     **/
  240.     DMsg("\n\nYou have waiting mail!! view Mail Index now? [Y/n] =>");
  241.  
  242.     if(GetYesNo(TRUE))
  243.       MailCmd("SHOWMAIL");
  244.  
  245. RETURNS:
  246.  
  247.    TRUE for YES , FALSE for NO
  248.  
  249.  
  250. 7.    LIBRARY_LIST
  251.  
  252.                      ApT-BBS ApTControl.library List
  253.  
  254.   AutoMsg()             ApplyTemplate()       ButtonOpts()       
  255.   CentreString()        ContinueScan()        ChatMode()         
  256.   ChainApT()            DMsg(String)          Download()         
  257.   DotIt(var)            DropLine()            EasyPrompt()       
  258.   EditStats()           FreeFileArea()        FlagCmd()          
  259.   FlushAccount()        FileAreaInfo()        FileSize()         
  260.   FilterMenu()          FileStyle()           FindDefaultBase()  
  261.   GetChar()             GetLiveChar()         GetTimedChar()     
  262.   GetPassword()         GetUserInfo()         GetStaticStr()     
  263.   GetStaticVar()        GetStr()              GetUserFromDir()   
  264.   GetVariable()         GlobalNewScan()       HasAccess()        
  265.   Hotkey()              HotCur()              HotOpts()          
  266.   Inform()              InitFileArea()        IsDrop()           
  267.   LinkIntoDoor()        ListMarked()          LineEditor()       
  268.   LiberateCmd()         LoadAccount()         LoadFile()         
  269.   LockDoor()            LocalNewScan()        MailCmd()          
  270.   MarkFile()            MoveFile()            MoveUser()         
  271.   NewUserFunction()     NextArea()            PageSysop()        
  272.   PrevArea()            RemoveDoorLink()      RemoveMarked()     
  273.   RoboMsg()             RunDos()              RunEasyDos()       
  274.   RunParaDoor()         SaveAccount()         ScrollBody()       
  275.   ScanFiles()           SelectFileArea()      SetSig()           
  276.   SetStr()              SetVariable()         SetBreak()         
  277.   ShowTpl()             ShowFile()            ShowRawFile()      
  278.   SmallED()             TouchIndex()          UpdateHistograms() 
  279.   Underscore()          UnfixedCmd()          Upload()           
  280.   ViewArchive()         XferOpts()         
  281.  
  282.  
  283. 8.    APTCLASSICDEFS
  284.  
  285.  
  286.    The ApTClassicDefs.H file contains all of the defines that will
  287.    serve the following commands:
  288.  
  289.     GetStaticStr(strnumber)    _STSTR defines applicable.
  290.     GetStaticVar(varnumber)    _STVAR defines applicable.
  291.     GetStr(strnumber)           _STR defines applicable.
  292.  
  293.                                  - Page 4 -
  294. 8.    APTCLASSICDEFS
  295.  
  296.     GetVariable(varnumber)     _VAR defines applicable.
  297.     SetStr(varnum,string)      _STR defines applicable.
  298.     SetVariable(varnum,val)    _VAR defines applicable.
  299.     NewUserFunction(Function)  _CALL defines applicable.
  300.  
  301.  
  302. 9.    LINKINTODOOR
  303.  
  304.  NAME:
  305.  
  306.     LinkIntoDoor(linenumber)(d0)
  307.  
  308. FUNCTION:
  309.  
  310.     After opening the ApTControl.library it is required link into the
  311.     ApT-line that you wish to control from external sources (such as a
  312.     module/door) - This command does just this. Once locked into a
  313.     door you are then able to use the various functions within the
  314.     library.
  315.  
  316. EXAMPLE:
  317.  
  318.       if(LinkIntoDoor(LineNumber))
  319.       {
  320.          DoThing();
  321.  
  322.          RemoveDoorLink();
  323.       }
  324.  
  325.  
  326. RETURNS:
  327.  
  328.     BOOL - FALSE for failure.
  329.  
  330. SEE-ALSO:
  331.  
  332.    RemoveDoorLink()
  333.  
  334.  
  335. 10.    REMOVEDOORLINK
  336.  
  337.  NAME:
  338.  
  339.    RemoveDoorLink()
  340.  
  341. FUNCTION:
  342.  
  343.    Closes down your communication between your controlling program and
  344.    ApT, thus rendering ApT to once again resume normal service.
  345.  
  346. EXAMPLE:
  347.  
  348.    RemoveDoorLink();
  349.  
  350. SEE-ALSO:
  351.  
  352.    LinkIntoDoor()
  353.  
  354.  
  355. 11.    DMSG
  356.  
  357.  NAME:
  358.  
  359.     DMsg(String)(a0)
  360.  
  361. FUNCTION:
  362.  
  363.     Used to display text to the screen - The string can be any length
  364.     and can use AML codes for additonal control over the display.
  365.  
  366.  
  367.                                  - Page 5 -
  368. 11.    DMSG
  369.  
  370. EXAMPLE:
  371.  
  372.     DMsg("Hello world,.. Press a key %WAITKEY.");
  373.  
  374.  
  375. 12.    SHOWTPL
  376.  
  377.  NAME:
  378.  
  379.     ShowTpl(TemplateName)(a0)
  380.  
  381. FUNCTION:
  382.  
  383.     Shows (displays) a file within the 'tplates:' directory, adding
  384.     the '.tpl' extension onto the end of the supplied filename. This
  385.     command also uses AML codes, if required.
  386.  
  387. EXAMPLE:
  388.  
  389.       /*
  390.       ** tplates:menus/mymenu.tpl displayed to screen.
  391.       **/
  392.       ShowTpl("menus/mymenu");
  393.  
  394.  
  395. RETURNS:
  396.  
  397.  
  398. 13.    SHOWFILE
  399.  
  400.  NAME:
  401.  
  402.     ShowFile(FileName)(a0)
  403.  
  404. FUNCTION:
  405.  
  406.     Same as the ShowTpl(..) command but requiures a full path and
  407.     filename rather than relying on tplates: and .tpl being added to
  408.     the given name.
  409.  
  410.     Uses AML.
  411.  
  412. EXAMPLE:
  413.  
  414.       /*
  415.       ** displays the file ram:wishingwell.txt to the
  416.       ** screen.
  417.       **/
  418.       ShowFile("ram:wishingwell.txt");
  419.  
  420.  
  421. 14.    EASYPROMPT
  422.  
  423.  NAME:
  424.  
  425.     EasyPrompt(Arguments)(a0)
  426.  
  427. TEMPLATE:
  428.  
  429.     "STRING/A,LEN/N,CASE/S,LETTER/S,NUMBER/S,ASCII/S,UPFIRST/S,PUNCT/S"
  430.      
  431.  
  432. FUNCTION:
  433.  
  434.     Allows EASY prompting, ..
  435.  
  436. EXAMPLE:
  437.  
  438.       /*
  439.       ** ask the user for a string no more than 60 characters
  440.  
  441.                                  - Page 6 -
  442. 14.    EASYPROMPT
  443.  
  444.       ** in length, storing the result in the 'input' buffer
  445.       ** upon pressing of return. Does not store the actual
  446.       ** return code itself, just the pure string.
  447.       **/
  448.       UBYTE input[64];
  449.  
  450.       DMsg("\nEnter something> ");
  451.       strcpy(input,EasyPrompt("STRING=\"\" LEN=60 ASCII"));
  452.  
  453. RETURNS:
  454.  
  455.     Pointer to string..
  456.  
  457.  
  458. 15.    DROPLINE
  459.  
  460.  NAME:
  461.  
  462.     DropLine()
  463.  
  464. FUNCTION:
  465.  
  466.     Drops the line,.
  467.  
  468. EXAMPLE:
  469.  
  470.       if(BadBadUser)
  471.       {
  472.          DMsg("Your outta here..\nSeeya..\n");
  473.          DropLine();
  474.       }
  475.  
  476.  
  477. 16.    ISDROP
  478.  
  479.  NAME:
  480.  
  481.       IsDrop()
  482.  
  483. FUNCTION:
  484.  
  485.       Finds out what the state of the line is, dropped or not.
  486.  
  487. EXAMPLE:
  488.  
  489.       if(IsDrop())
  490.       {
  491.          /*
  492.          ** The user has vanished..
  493.          **/
  494.  
  495.          .
  496.          .
  497.       }
  498.       else
  499.       {
  500.          DMsg("Phew, .. you still exist!\n");
  501.       }
  502.  
  503. RETURNS:
  504.  
  505.       BOOL - TRUE denotes line has dropped.
  506.  
  507.  
  508. 17.    SETBREAK
  509.  
  510.  NAME:
  511.  
  512.       SetBreak(KeyTokens)(a0)
  513.  
  514.  
  515.                                  - Page 7 -
  516. 17.    SETBREAK
  517.  
  518. FUNCTION:
  519.  
  520.    This function allows your arexx menus to define what characters will
  521.    interrupt your menus. If you have only 'G' for logoff, 'C' for page
  522.    sysop and 'F' for menus, as well as 'M' for message areas, then you
  523.    would only wish for characters: "GCFM" to interrupt a given menu while
  524.    all other characters have no effect.
  525.  
  526.    Uses for this command would be at the start of each of your 'menu'
  527.    routines, Your main menu, utilities menu, etc.. simply entering
  528.    the characters that ought to break your menus display.
  529.  
  530.    You should also set up a the ^C (Ctrl+C) break code, which can
  531.    be specified as '3'x - This would allow your users to break the
  532.    display of templates using this key (as well as others..) - If
  533.    you are in some form of loop then you should also check for the
  534.    ^C keypress and 'not' refresh a menu.
  535.  
  536.    In some instances, such as the newuser_logon.apt script, it is
  537.    wise to turn off all instances of 'breaking' - thus one would
  538.    use the command: 'SETBREAK' '0'x to turn off such instances.
  539.  
  540. EXAMPLE:
  541.  
  542.    SetBreak( "GCFM" );
  543.  
  544.    The above only allows your menus to be interrupted, while being
  545.    displayed by the characters G C F M.
  546.  
  547.    SetBreak( 0 );
  548.  
  549.    The above would stop NO characters, so your menu(s) would display
  550. without
  551.    interruption by any characters.
  552.  
  553.    SetBreak( 1 );
  554.  
  555.    This allows ANY character press to stop your menu(s).
  556.  
  557.  
  558. 18.    HOTKEY
  559.  
  560.  NAME:
  561.  
  562.     Hotkey(String)(a0)
  563.  
  564. FUNCTION:
  565.  
  566.     Allows the sending out of a initial string, before returning the
  567.     very first character that has been pressed by the user.
  568.  
  569.     HotOpts(..) command which allows various aspects of the hotkey
  570.     command to be changed. 
  571.  
  572. EXAMPLE:
  573.  
  574.     UBYTE Character;
  575.     
  576.     Character = HotKey( "Press a key =>" );
  577.  
  578. RETURNS:
  579.  
  580.     UBYTE Character.
  581.  
  582. SEE ALSO:
  583.  
  584.     See HotOpts() for more information on control of this command.
  585.  
  586.  
  587.  
  588.                                  - Page 8 -
  589. 18.    HOTCUR
  590.  
  591.  
  592. 19.    HOTCUR
  593.  
  594.  NAME:
  595.  
  596.       HotCur(string)(a0)
  597.  
  598. FUNCTION:
  599.  
  600.     In many ways this is much the same as the standard HOTKEY command
  601.     but with a few differences. The command returns exactly the same
  602.     returns as HotKey(..) but the difference is within its return of
  603.     the CURSOR keys.
  604.     
  605.     The command can be used to get CURSOR key movements from the user
  606.     without much difficulty than otherwise would be the case if using
  607.     the standard HotKey(..) command. The other thing to note is that
  608.     the HotOpts(..) MIN/MAX command is not taken into account here, and
  609.     all keys in the range of 0-255 are returned back to the user. So
  610.     if you wish to filter out keys of a certain range then you should
  611.     use HotOpts(..) "SYSOPKEY" to see who the last typer was.
  612.  
  613.     When ever it is required to monitor for a cursor key, the first
  614.     thing that you have to understand is that cursor movements are
  615.     made up of 3 characters.
  616.  
  617.     A indicates that the cursor is to be moved in the UP directon.
  618.  
  619.      is the ESCape character
  620.     [ is the second character in the phase-chain
  621.     A,B,C or D are the actual Cursor direction requests.
  622.  
  623.     If you monitor using the standard HotKey(..) command for the
  624.     above, it is easy to see that you require 3 different HotKey(..)
  625.     calls in order to find out what cursor key has been pressed. All
  626.     of this is slower than normal because of the time it takes to call
  627.     the HotKey(..) command, 3 times in all. It just is not really worth
  628.     it, unless you can call it once and expect it to return the next
  629.     character as the direction. This is what the HotCur(..) command does.
  630.     It handles the monitoring of the cursor key(s) and returns one of
  631.     the following values when pressed (both for local and serial line,
  632.     unlike HotKey(..) ) - It returns ONE single character of which the
  633.     defines show below.
  634.  
  635.     CUR_UP    = 252  /* the rawkey defines */
  636.     CUR_DOWN  = 253
  637.     CUR_RIGHT = 254
  638.     CUR_LEFT  = 255
  639.  
  640.  
  641. EXAMPLE:
  642.  
  643.    #define  CUR_UP      252  /* the rawkey defines */
  644.    #define  CUR_DOWN    253
  645.    #define  CUR_RIGHT   254
  646.    #define  CUR_LEFT    255
  647.  
  648.    UBYTE rawkey;
  649.  
  650.    rawkey = HotCur("")
  651.  
  652.    switch( rawkey )
  653.    {
  654.       case CUR_UP:
  655.          DMsg("You pressed Cursor up");
  656.          break;
  657.       case CUR_DOWN:
  658.  
  659.                                  - Page 9 -
  660. 19.    HOTCUR
  661.  
  662.          DMsg("You pressed Cursor Down");
  663.          break;
  664.       case CUR_RIGHT:
  665.          DMsg("You pressed Cursor Right");
  666.          break;
  667.       case CUR_LEFT:
  668.          DMsg("You pressed Cursor Left");
  669.          break;
  670.       default:
  671.          break;
  672.    }
  673.  
  674. RETURNS:
  675.  
  676.     Exactly the same as the Hotkey(..) command but Cursor keys are
  677.     returned as SINGLE characters of 0xFC 0xFD 0xFE 0xFF (Hex, or
  678.     use above defines or even 252,253,254,255 Decimal)
  679.  
  680. SEE-ALSO:
  681.  
  682.   Hotkey() link HOTKEY} , @{
  683.  
  684.  
  685. 20.    DOIT
  686.  
  687.  NAME:
  688.  
  689.    DotIt()
  690.  
  691. FUNCTION:
  692.  
  693.    This function prints a '.' (dot), X positions from the current
  694.    cursor position. This is generally used once a line such as the
  695.    within the example below.
  696.  
  697. EXAMPLE:
  698.  
  699.  
  700.       DMsg("Enter your name =>");
  701.       DotIt(18);
  702.       
  703.       /* Prompt calls etc.. */
  704.  
  705.       .
  706.  
  707.       .
  708.  
  709.       /* results in (minus speechmarks) */
  710.  
  711.       "Enter your name =>                 ."
  712.  
  713.  
  714. 21.    PAGESYSOP
  715.  
  716.  NAME:
  717.  
  718.    PageSysop()
  719.  
  720. FUNCTION:
  721.  
  722.    Actually does just that, pages for the system operator via the
  723.    internally built chat conferencing system.
  724.  
  725. EXAMPLE:
  726.  
  727.       switch(Character)
  728.       {
  729.          case 'C':
  730.             DMsg("Calling for the System operator...");
  731.  
  732.                                 - Page 10 -
  733. 21.    PAGESYSOP
  734.  
  735.             PageSysOp();
  736.             break;
  737.          case 'F':
  738.             .
  739.  
  740.             .
  741.  
  742.  
  743. 22.    EDITSTATS
  744.  
  745.  NAME:
  746.  
  747.    EditStats(StatsFunction)(d0)
  748.  
  749. FUNCTION:
  750.  
  751.    Takes the user to one of the two inbuilt editing-stats options,
  752.    either "edit personal" or "edit terminal" options.
  753.  
  754.  
  755. EXAMPLE:
  756.  
  757.    EditStats(0); /* Edits 'Personal' preferences.. */
  758.    EditStats(1); /* Edits 'System' preferences..   */
  759.  
  760.  
  761. NOTES:
  762.  
  763.    Changes have been made to ApT in such a way that it will now call
  764.    an external "arexx script" - Modules will be created which you can
  765.    easily call via the LOCKDOOR options.. However, the rexx versions
  766.    should suffice.
  767.  
  768.  
  769. 23.    NEWUSERFUNCTION
  770.  
  771.  NAME:
  772.  
  773.    NewUserFunction(Function)(d0)
  774.  
  775. FUNCTION:
  776.  
  777.    Calls one of the various forms of "internal" new-user functions,
  778.    normally asking for information such as computer-make, etc.
  779.  
  780. EXAMPLE:
  781.  
  782.    NewUserFunction( functionnumber );
  783.  
  784. SEE-ALSO:
  785.  
  786.     ApTClassic Defines 
  787.  
  788.  
  789. 24.    GETPASSWORD
  790.  
  791.  NAME:
  792.  
  793.    GetPassword(Length)(d0)
  794.  
  795. FUNCTION:
  796.  
  797.    This function is most handy in that it will allow you to get a
  798.    string from the user, but whenever a key is pressed it will display
  799.    the # (HASH) symbol in the characters place.
  800.  
  801. EXAMPLE:
  802.  
  803.    RawText( "Enter your password to enter private area =>" );
  804.    strcpy(PBuffer,GetPassword(8));
  805.  
  806.                                 - Page 11 -
  807. 24.    GETPASSWORD
  808.  
  809.  
  810.    Enter your password to enter private area =>###<etc..>
  811.  
  812.    The above would only allow a maximum of 8 characters to be
  813.    entered.
  814.  
  815. RETURNS:
  816.  
  817.    Password string entered.
  818.  
  819.  
  820. 25.    HASEXPIRED
  821.  
  822.  NAME:
  823.  
  824.    HasExpired()
  825.  
  826. FUNCTION:
  827.  
  828.    This will allow you to know if the users account has come up for
  829.    review or not. You should then take actions if this is true,
  830.    generally this would be used within the interlog.apt (or module)
  831.    file, giving some indication that he has come up for review before
  832.    giving him a chance to page for the sysop and/or leave feedback
  833.    before he is dropped off.
  834.  
  835. RETURNS:
  836.  
  837.    TRUE or FALSE depending if he has come up for review or not (TRUE
  838.    denoting user has come up for review)
  839.  
  840.  
  841. 26.    CHATMODE
  842.  
  843.  NAME:
  844.  
  845.    ChatMode()
  846.  
  847. FUNCTION:
  848.  
  849.    Enters chatmode, directly.
  850.  
  851.  
  852. EXAMPLE:
  853.  
  854.          .
  855.  
  856.          .
  857.  
  858.          default:
  859.             switch(RawChar)
  860.             {
  861.                case 240:      /* Function key 1 pressed (F1) */
  862.                   ChatMode();
  863.                   break;
  864.                default:
  865.                   break;
  866.             }
  867.             break;
  868.       }
  869.  
  870.  
  871. 27.    FLUSHACCOUNT
  872.  
  873.  NAME:
  874.  
  875.    FlushAccount()
  876.  
  877. FUNCTION:
  878.  
  879.  
  880.                                 - Page 12 -
  881. 27.    FLUSHACCOUNT
  882.  
  883.    Flushes the users information from memory to disk. This should be
  884.    used when you need to make sure changes are noted by the system,
  885.    such things as a "guru" or a "reset" would render memory contained
  886.    changes un-seen during new calls by the user.
  887.  
  888.  
  889. 28.    CHAINAPT
  890.  
  891.  NAME:
  892.  
  893.    ChainApT(FileName)(a0)
  894.  
  895. FUNCTION:
  896.  
  897.    Loads in a ApTREXX file and uses for the duration until it returns
  898.    back to the above call. Simply pass the filename of the file minus
  899.    the aptrexx: and .apt additions (which are auto-added)
  900.  
  901. EXAMPLE:
  902.  
  903.       /*
  904.       ** Loads and runs "ApTRexx:WishingWell.tpl");
  905.       **/
  906.       ChainApT("WishingWell");
  907.  
  908.       /*
  909.       ** Loads and runs "ApTRexx:Daleks/Leader.tpl");
  910.       **/
  911.       ChainApT("Daleks/Leader");
  912.  
  913. RETURNS:
  914.  
  915.    TRUE for success, FALSE for failure.
  916.  
  917.  
  918. 29.    RUNDOS
  919.  
  920.  NAME:
  921.  
  922.    RunDos(FileName)(a0)
  923.  
  924. FUNCTION:
  925.  
  926.    Allows the running of a DOS program with the callers own argument
  927.    parsing string. Re-direction will have to be passed within the
  928.    string, as well as any other required settings for the dos program
  929.    to actually work.
  930.  
  931.    This routine should only be used if you know what you are doing. It
  932.    allows far greater control over the way dos programs are called.
  933.  
  934.  
  935. EXAMPLE:
  936.  
  937.    RunDos("run >nil: newshell >nil: %HANDLER. from t:game.script %RAW.");
  938.  
  939.    This would have the effect of calling a standard DOS BATCH and all
  940.    actions would be acted out within the ApTline window.
  941.  
  942. RETURNS:
  943.  
  944.  
  945. SEE ALSO:
  946.  
  947.     RunEasyDos()
  948.  
  949.  
  950. 30.    RUNEASYDOS
  951.  
  952.  NAME:
  953.  
  954.                                 - Page 13 -
  955. 30.    RUNEASYDOS
  956.  
  957.  
  958.    RunEasyDos(FileName)(a0)
  959.  
  960. FUNCTION:
  961.  
  962.    Allows the running of DOS programs the easy way. Unlike the
  963.    RunDos(..) command, this command adds all of the re-direction
  964.    handlers itself. This leaves the caller free to supply a very basic
  965.    string for a game/utility to be called. Generally this would be the
  966.    command that would be used. It acts out exactly the same as the
  967.    MENU RunDos function.
  968.  
  969. EXAMPLE:
  970.  
  971.    RunEasyDos( "%RAW. DOORS:KNOT/KNOT %LNAME." );
  972.  
  973.    This would have the effect of calling a game with RAW mode on. The
  974.    arguments to the right of the %RAW. command are the path to the
  975.    door and any other arguments that may follow. This is the easiest
  976.    way of running doors that do not require batch files to be worked.
  977.  
  978. RETURNS:
  979.  
  980.  
  981. SEE ALSO:
  982.  
  983.    RunDos()
  984.  
  985.  
  986. 31.    XFEROPTS
  987.  
  988.  NAME:
  989.  
  990.    XferOpts(Arguments)(a0)
  991.  
  992. TEMPLATE:
  993.  
  994.    "CLEARLIST/S,TAGFILE/K,SENDFILES/S,UPDATERATIO/S"
  995.  
  996. FUNCTION:
  997.  
  998.    Allows control over tagging and sending of global files, with or
  999.    without ratio stats updating.
  1000.  
  1001.    CLEARLIST   - Clears the download list.
  1002.    TAGFILE     - Tag a filename-entry to the download list.
  1003.    SENDFILES   - Send all of the tagged files as soon as possible.
  1004.    UPDATERATIO - Update the users bytes etc.. ratio after download.
  1005.  
  1006. EXAMPLE:
  1007.  
  1008.    /*
  1009.    ** Send ONE single file to the user as soon as possible.
  1010.    ** The 'TPlates:sys/sys_protocols.tpl' is always shown before
  1011.    ** the upload takes place, allowing the user to change his
  1012.    ** protocol.
  1013.    **/
  1014.    XferOpts ("CLEARLIST TAGFILE RAM:File1.LHA SENDFILES");
  1015.  
  1016.    /*
  1017.    ** Clears the download list and then tags 3 files for
  1018.    ** download. The 'SENDFILES' command is then issued along
  1019.    ** with the UPDATERATIO which updates the users bytes etc..
  1020.    **/
  1021.    XferOpts("CLEARLIST");
  1022.    XferOpts("TAGFILE RAM:File1.LHA");
  1023.    XferOpts("TAGFILE RAM:File2.LHA");
  1024.    XferOpts("TAGFILE RAM:File3.LHA");
  1025.  
  1026.                                 - Page 14 -
  1027. 31.    XFEROPTS
  1028.  
  1029.    XferOpts("SENDFILES UPDATERATIO");
  1030.  
  1031. RETURNS:
  1032.  
  1033.  
  1034. 32.    BUTTONOPTS
  1035.  
  1036.  NAME:
  1037.  
  1038.    ButtonOpts(Arguments)(a0)
  1039.  
  1040. TEMPLATE:
  1041.  
  1042.   "LOADBANK/K,INITBANK/S,DISPLAY/S,USEBANK/S,GETPOS/S,SETPOS/N,CLEARBUTTON/S
  1043. "
  1044.  
  1045. FUNCTION:
  1046.  
  1047.    Using a combination of commands related to this command enables
  1048.    various display functions relating to the 'button/highlight' look.
  1049.  
  1050.    LOADBANK="tplates:button/main.bank"  (Path to bank to load)
  1051.  
  1052.    INITBANK  - Simply re'inits the bank in question to defaults.
  1053.  
  1054.    DISPLAY   - Forces the entire button list to be 'refreshed'
  1055.  
  1056.    USEBANK   - Actually uses the loaded bank. Cursor appears at the
  1057.               first button and input continues until a key has been
  1058.               pressed.
  1059.  
  1060.    GETPOS    - Returns the number of the button currently selected within
  1061.               result.
  1062.  
  1063.    SETPOS    - Forces a button number to be the 'selected' one.
  1064.  
  1065.    CLEARBUTTON - Simply clears a 'highlighted' button.. it is only VISUAL
  1066.                 and does not affect the current setting of the button.
  1067.                 Used with such things as when you have more than one
  1068.                 button bank displayed on the same screen, but wish to
  1069.                 keep the cursor highlighted on only one button bank.
  1070.    EXAMPLE:
  1071.  
  1072.    See included example files.
  1073.  
  1074. RETURNS:
  1075.  
  1076.    Various, .. However, the ones that are important are:
  1077.  
  1078.    LOADBANK - returns 0 for failure.
  1079.    USEBANK  - returns the key that was actually pressed within result.
  1080.              This can then be used to do various things depending on
  1081.              what the script requires.
  1082.  
  1083. SEE ALSO:
  1084.  
  1085.    Included example rexx files and Manager 'BUTTONDATA' rexx command.
  1086.  
  1087.  
  1088. 33.    AUTOMSG
  1089.  
  1090.  NAME:
  1091.  
  1092.    AutoMsg(Arguments)(a0)
  1093.  
  1094. TEMPLATE:
  1095.  
  1096.    B=Body/A/K,A=Area/A/N,T=To/A/K,F=From/A/K,S=Subject/A/K,
  1097.    P=Private/K/S,F=File/A/K
  1098.  
  1099.                                 - Page 15 -
  1100. 33.    AUTOMSG
  1101.  
  1102.  
  1103. FUNCTION:
  1104.  
  1105.    Allows the posting of messages to a user who is currently online.
  1106.  
  1107.    Body    - actual ascii text file to be used as the base of the message.
  1108.    Area    - The area number the message is to be placed into.
  1109.    To      - The user who the message is directed to.
  1110.    From    - The entity that the message is addressed from.
  1111.    Subject - The subjet text.
  1112.    Private - If supplied the message is classed as private.
  1113.    File    - Allows the sending of a file along with the message. Overrides
  1114.              the 'Subject' token if it is also supplied.
  1115.  
  1116. EXAMPLE:
  1117.  
  1118.    AutoMsg("ram:body.txt area=1 to=\"Andy Grifo\" from=\"Dave McIntosh\"
  1119. subject=\"Life..\");
  1120.  
  1121. RETURNS:
  1122.  
  1123.  
  1124. 34.    HOTOPTS
  1125.  
  1126.  NAME:
  1127.  
  1128.     HotOpts(Arguments)(a0)
  1129.  
  1130. TEMPLATE:
  1131.  
  1132.    "MIN/K/N,MAX/K/N,ALL/S,RESET/S,SYSOPKEY/S"
  1133.  
  1134. FUNCTION:
  1135.  
  1136.     This function setsup the options for use with the Hotkey(..)
  1137.     command.
  1138.  
  1139.     The Character set is based on a 0-255 character scale, RETURN
  1140.     being positioned at 10 and the normal QWERTY keyboard characters
  1141.     being positioned at 32 - 127.
  1142.  
  1143.     So, in normal use whenever you wish to have a key returned from
  1144.     the user, you are going to require, most of the time, characters
  1145.     in the range of: 0-127 , with the outer limit 128-255 being
  1146.     filtered out.
  1147.  
  1148.     This way it allows for the sysop to program hidden functions in
  1149.     menus that monitor for keypresses greater than 127, for such
  1150.     things as the Function keys, based around positions 240-249, and
  1151.     sysop cursor presses a littler further.
  1152.  
  1153.     MIN & MAX allow you to change the bounds of the "user monitored"
  1154.     keypresses, and filters out characters not within that range, thus
  1155.     never quite returning them to the rexx script.
  1156.  
  1157.     MIN & MAX are normally set to 0 and 127 (7F Hex).
  1158.  
  1159.     ALL allows the full range of 0-255 characters to be returned if
  1160.     the user hits any combination of key-presses. Not normally used,
  1161.     but sometimes it may become required.
  1162.  
  1163.     "RESET" - This resets the values to the default, and both MIN and
  1164.     MAX contain 0 and 127, default values.
  1165.  
  1166.     "SYSOPKEY" - This returns a 0 or a 1 depending on WHO typed the
  1167.     last character in the Hotkey(..) command. 0 is returned if the key
  1168.     was pressed at the "Local Side", and 1 if the keypress was typed
  1169.     at the "Connected, terminal side." - This allows you to obviously
  1170.  
  1171.                                 - Page 16 -
  1172. 34.    HOTOPTS
  1173.  
  1174.     test to see if the key was SYSOP pressed, and act on it, but not
  1175.     if the user accessed it.
  1176.  
  1177. EXAMPLE:
  1178.  
  1179.     /*
  1180.     ** Only ever return USER key-presses in
  1181.     ** the range of 0-127, standard default.
  1182.     **/
  1183.     HotOpts("MIN=0 MAX=127");
  1184.  
  1185.     /*
  1186.     ** Return ALL of the USER key-presses in
  1187.     ** the range of 0-255.
  1188.     **/
  1189.     HotOpts("ALL");
  1190.  
  1191.     /*
  1192.     ** Reset the MIN & MAX values to
  1193.     ** 0-127.
  1194.     **/
  1195.     HotOpts("RESET");
  1196.  
  1197.     /*
  1198.     ** Find out who pressed the last key,
  1199.     ** was it from the Console Side, or the
  1200.     ** Connected-Terminal side.
  1201.     **/
  1202.     typer = HotOpts("SYSOPKEY"); 
  1203.     if(typer)  DMsg("Console  -> SysOp Hit a key, wow!");
  1204.     else       DMsg("Terminal -> User Hit a key, wow!");
  1205.  
  1206. RETURNS
  1207.  
  1208.    Depending on command, who pressed the last key.
  1209.  
  1210. SEE ALSO:
  1211.  
  1212.    Hotkey()
  1213.  
  1214.  
  1215. 35.    SCROLLBODY
  1216.  
  1217.  NAME:
  1218.  
  1219.       ScrollBody(Arguments)(a0)
  1220.  
  1221. TEMPLATE (of-sorts..):
  1222.  
  1223.     ScrollBody( <filename> <headersize> [continue scroll flag] );
  1224.  
  1225. FUNCTION:
  1226.  
  1227.     This function is intended to be used for any form of page
  1228.     scrolling. It allows for the placement of a header at the top
  1229.     portion of the screen and then for a body to be scrolled while
  1230.     keeping the header intact. After this the command can be re-used
  1231.     along with the continue-scroll-flag set and a filename pointing to
  1232.     a 'footer' which would finish off the display according to ApT
  1233.     Standards.
  1234.  
  1235. EXAMPLE:
  1236.  
  1237.     /*
  1238.     ** We first display our header, .. this is 3 lines long as one
  1239.     ** can see. We also turn OFF the cursor for FASTER displays.
  1240.     **/
  1241.     DMsg("%CLS.%CURSOR=0.Header1\nHeader2\n");
  1242.  
  1243.                                 - Page 17 -
  1244. 35.    SCROLLBODY
  1245.  
  1246.     DMsg("\c1ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1247. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\c7\n");
  1248.  
  1249.     /*
  1250.     ** We now pass our body file (the file to be scrolled within the window
  1251.     ** yet not over-writing our previous header by supplying the filename
  1252.     ** along with the number of lines that our header took up. So in our
  1253.     ** example header this would be 3 (3 lines for the header)
  1254.     **/
  1255.     ScrollBody("ram:Message.TXT 3");
  1256.  
  1257.     /*
  1258.     ** Once the body has been been scrolled it is normal to finish off with
  1259.     ** 'tear line(s)' of some form to close the windows display. We would
  1260.     ** do as we did in the previous command but this time we would supply
  1261.     ** a extra flag of '1' which would denote that it is to be 'scroll
  1262.     ** appended' to the very end of the previous text.
  1263.     ScrollBody("ram:Footer.TXT 3 1");
  1264.  
  1265.     DMsg("%CURSOR=1.");
  1266.  
  1267. NOTES:
  1268.  
  1269.     It is VERY IMPORTANT that whenever this command is used that
  1270.     programmer first turns the cursor OFF, this results in a very
  1271.     greater speed increase than would be of normal. Obviously once the
  1272.     routine has been finished with the cursor can be re-turned on.
  1273.  
  1274.     The command will act just like a ShowFile(..) command if the user
  1275.     can not take ansi etc.
  1276.  
  1277.     The routine is quite logical and is ideal for appending different
  1278.     body files onto the end of a previous one and thus continuing the
  1279.     scroll. To append always make quite sure you supply the '1' flag
  1280.     as the last argument.
  1281.  
  1282. RESULTS:
  1283.  
  1284.     Success - Boolean 0 or 1 within result.
  1285.  
  1286.  
  1287. 36.    GETCHAR
  1288.  
  1289.  NAME:
  1290.  
  1291.     GetChar()
  1292.  
  1293. FUNCTION:
  1294.  
  1295.    Allows the returning of the next character typed, unaltered.
  1296.  
  1297. EXAMPLE:
  1298.  
  1299.    UBYTE RawChar,UpperChar;
  1300.  
  1301.    RawChar   = GetChar();
  1302.    UpperChar = toupper(RawChar);
  1303.  
  1304.    switch(UpperChar)
  1305.    {
  1306.       case 'C':
  1307.          PageSysop();
  1308.          break;
  1309.       case 'F':
  1310.          FilesMenu();
  1311.          break;
  1312.       default:
  1313.          switch(RawChar)
  1314.  
  1315.                                 - Page 18 -
  1316. 36.    GETCHAR
  1317.  
  1318.          {
  1319.             case 240:
  1320.                DMsg("\nYou pressed F1\n");
  1321.                break;
  1322.             case 241:
  1323.                DMsg("\nYou pressed F2\n");
  1324.                break;
  1325.             default:
  1326.                break;
  1327.          }
  1328.          break;
  1329.    }
  1330.  
  1331. RETURNS:
  1332.  
  1333.    The next character typed.
  1334.  
  1335.  
  1336. 37.    GETUSERINFO
  1337.  
  1338.  NAME:
  1339.  
  1340.       GetUserInfo()
  1341.  
  1342. FUNCTION:
  1343.  
  1344.    It is often required to tap into the actual "users" data file, so
  1345.    that one has total control over what is both read and entered into
  1346.    it. By using this command it allows you to do just that, returning
  1347.    a pointer to the 'userdata'.
  1348.  
  1349. EXAMPLE:
  1350.  
  1351.    UBYTE Buffer[80];
  1352.  
  1353.    struct UserInfo *ui=NULL;
  1354.  
  1355.    ui = (struct UserInfo *)GetUserInfo();
  1356.  
  1357.    sprintf(Buffer,"Your name is:%s\n Your handle is:%s\n",
  1358.       ui->us_name,ui->us_alias);
  1359.  
  1360.    DMsg(Buffer);
  1361.  
  1362. NOTES:
  1363.  
  1364.     Be very careful what you put into the structure as size
  1365.     differences do make a difference and you may find that you are
  1366.     overwriting important items of the users file.
  1367.  
  1368.  
  1369. RETURNS:
  1370.  
  1371.     A pointer to the UserInfo structure pertaining to the line that
  1372.     you are currently locked into.
  1373.  
  1374.  
  1375. 38.    LOCKDOOR
  1376.  
  1377.  NAME:
  1378.  
  1379.     LockDoor(argumets)(a0)
  1380.  
  1381. FUNCTION:
  1382.  
  1383.     Allows the running of a ApT-Only programmed module or door.
  1384.  
  1385. EXAMPLE:
  1386.  
  1387.  
  1388.                                 - Page 19 -
  1389. 38.    LOCKDOOR
  1390.  
  1391.     LockDoor("apt:modules/interlogin args=CONFIGURE");
  1392.  
  1393.     would actually run the door called "interlogin" from
  1394.     "apt:modules/" and would then pass the LINENUMBER (so the program
  1395.     knows exactly what line it is to communicate to) followed by the
  1396.     arguments that you supply 'for that program' (it may not require
  1397.     any, see documentation for the module/door being used)
  1398.  
  1399.  
  1400. 39.    UPDATEHISTOGRAMS
  1401.  
  1402.  NAME:
  1403.  
  1404.    UpdateHistograms()
  1405.  
  1406. FUNCTION:
  1407.  
  1408.    Update the various histograms for apt, .. used partly by the
  1409.    manager to view the status of the calls over a period of time.
  1410.  
  1411.    The information is written to the directory:
  1412.  
  1413.    apt:Histograms/
  1414.  
  1415. NOTES:
  1416.  
  1417.    This command will be moved into a Sub-Command at some stage.
  1418.  
  1419.  
  1420. 40.    INITFILEAREA
  1421.  
  1422.  NAME:
  1423.  
  1424.     InitFileArea()
  1425.  
  1426. FUNCTION:
  1427.  
  1428.     This HAS to be called when you taking a user to your file section.
  1429.     It may be that you only require to call it once, but it has to
  1430.     have one FreeFileArea(); at some stage to free resources. Normally
  1431.     you would have the InitFileArea(); call at the start of your file
  1432.     area entrance, and the FreeFileArea(); call at the end, before
  1433.     you return out of the subroutine.
  1434.  
  1435. EXAMPLE:
  1436.  
  1437.     See various included source files for examples.
  1438.  
  1439. RETURNS:
  1440.  
  1441.  
  1442. 41.    FREEFILEAREA
  1443.  
  1444.  NAME:
  1445.  
  1446.     FreeFileArea()
  1447.  
  1448. FUNCTION:
  1449.  
  1450.     Whenever a InitFileArea(); command is used, there must be a
  1451.     FreeFileArea(); at some stage, generally at the end of the
  1452.     file-routine. This frees various resources back to the system.
  1453.  
  1454. EXAMPLE:
  1455.  
  1456.     See the various included sources..
  1457.  
  1458. RETURNS:
  1459.  
  1460.  
  1461.  
  1462.  
  1463.                                 - Page 20 -
  1464. 41.    SCANFILES
  1465.  
  1466.  
  1467. 42.    SCANFILES
  1468.  
  1469.  NAME:
  1470.  
  1471.     ScanFiles()
  1472.  
  1473. FUNCTION:
  1474.  
  1475.     This function starts the 'Displaying' of the actual filenames and
  1476.     descriptions in either the normal display format, or the more
  1477.     advanced display format.
  1478.  
  1479. NOTES:
  1480.  
  1481.     You are required to have Initiated your file area before
  1482.     attempting to use this command. See examples for information on
  1483.     when and how to call this command and other file area
  1484.     sub-commands.
  1485.  
  1486. EXAMPLE:
  1487.  
  1488.     See the various included sources..
  1489.  
  1490. RETURNS:
  1491.  
  1492.  
  1493. 43.    SELECTFILEAREA
  1494.  
  1495.  NAME:
  1496.  
  1497.       SelectFileArea()
  1498.  
  1499. FUNCTION:
  1500.  
  1501.     Calls up the 'File Area Selection' screen, asks the user to select
  1502.     a file area and keeps track of such, but does no actual loading of
  1503.     the index.
  1504.  
  1505. EXAMPLE:
  1506.  
  1507.     See various included examples.
  1508.  
  1509. RETURNS:
  1510.  
  1511.     Returns the base selected or ~0 denoting the user pressed RETURN
  1512.     (which should be deemed as a QUIT from file area code, or area
  1513.     that they do not have access to)
  1514.  
  1515.  
  1516. 44.    TOUCHINDEX
  1517.  
  1518.  NAME:
  1519.  
  1520.     TouchIndex(index)(d0)
  1521.  
  1522. FUNCTION:
  1523.  
  1524.     Attempts to lock into a given file index (numbered from 0
  1525.     onwards..)
  1526.  
  1527.     Once a file area has been initiated and you have decided that you
  1528.     either have a 'area' number from the user via the SelectFileArea()
  1529.     command, or have a area you wish to 'force' touch, then this is
  1530.     the command that needs to be used.
  1531.  
  1532. EXAMPLE:
  1533.  
  1534.    ULONG selected_area;
  1535.  
  1536.                                 - Page 21 -
  1537. 44.    TOUCHINDEX
  1538.  
  1539.  
  1540.    selected_area = SelectFileArea();
  1541.  
  1542.    if(selected_area !=~0)
  1543.    {
  1544.       TouchIndex(selected_area);
  1545.    }
  1546.  
  1547.  
  1548.    another example would be,
  1549.  
  1550.  
  1551.    if(TouchIndex(12))
  1552.       DMsg("Successful touch of index 12..");
  1553.    else
  1554.       DMsg("Failure, ..");
  1555.  
  1556. RETURNS:
  1557.  
  1558.    BOOL, FALSE for failure, otherwise normal.
  1559.  
  1560.  
  1561. 45.    LOCALNEWSCAN
  1562.  
  1563.  NAME:
  1564.  
  1565.     LocalNewScan()
  1566.  
  1567. FUNCTION:
  1568.  
  1569.     The user is given the chance of scanning for new files SINCE the
  1570.     last date he was on the system, but scanning is only done for the
  1571.     file area that the user is 'within' at the moment of selection.
  1572.  
  1573. EXAMPLE:
  1574.  
  1575.     See the various included sources.
  1576.  
  1577.  
  1578. 46.    CONTINUESCAN
  1579.  
  1580.  NAME:
  1581.  
  1582.    ContinueScan()
  1583.  
  1584. FUNCTION:
  1585.  
  1586.     Once a FileArea has been touched, and in order for the user to
  1587.     have any descriptions displayed, the need for this command is
  1588.     required. It displays the given file areas until the user selects
  1589.     a command which indicates a abort from the 'description scanning',
  1590.     the user may still resume scanning from the position he left by
  1591.     re-calling this command.
  1592.  
  1593. EXAMPLE:
  1594.  
  1595.    See the various examples.
  1596.  
  1597. RETURNS:
  1598.  
  1599.  
  1600. 47.    GLOBALNEWSCAN
  1601.  
  1602.  NAME:
  1603.  
  1604.     GlobalNewScan()
  1605.  
  1606. FUNCTION:
  1607.  
  1608.     The user is given the chance of scanning for new files SINCE the
  1609.  
  1610.                                 - Page 22 -
  1611. 47.    GLOBALNEWSCAN
  1612.  
  1613.     last date he was on the system. Scanning is GLOBAL and all file
  1614.     areas that the user has access to are scanned.
  1615.  
  1616. EXAMPLE:
  1617.  
  1618.     See the various included sources.
  1619.  
  1620.  
  1621. 48.    REMOVEMARKED
  1622.  
  1623.  NAME:
  1624.  
  1625.       RemoveMarked()
  1626.  
  1627. FUNCTION:
  1628.  
  1629.     Gives the user a chance to remove files that are not required for
  1630.     download.
  1631.  
  1632.  
  1633. 49.    UPLOAD
  1634.  
  1635.  NAME:
  1636.  
  1637.       Upload()
  1638.  
  1639. FUNCTION:
  1640.  
  1641.     Allows the user to upload a file to the currently touched index.
  1642.  
  1643.  
  1644. 50.    DOWNLOAD
  1645.  
  1646.  NAME:
  1647.  
  1648.       Download()
  1649.  
  1650. FUNCTION:
  1651.  
  1652.     Currently marked files are sent to the user, first giving the user
  1653.     the chance to alter his protocols etc.
  1654.  
  1655.  
  1656. 51.    LISTMARKED
  1657.  
  1658.  NAME:
  1659.  
  1660.       ListMarked()
  1661.  
  1662. FUNCTION:
  1663.  
  1664.    Lists all currently marked files.
  1665.  
  1666.  
  1667. 52.    NEXTAREA
  1668.  
  1669.  NAME:
  1670.  
  1671.     NextArea()
  1672.  
  1673. FUNCTION:
  1674.  
  1675.     Advances automatically onto the 'Next' file area that the user has
  1676.     access to. The area is auto-touched and generally everything is
  1677.     done for you within this instance. Allows for quick and easy area
  1678.     advancements. Upon reaching the end of a file area boundy (the
  1679.     maxmimum in the direction) the function then stars once more from
  1680.     the start, so acts in a "Circle" format.
  1681.  
  1682.  
  1683. 53.    PREVAREA
  1684.  
  1685.  NAME:
  1686.  
  1687.                                 - Page 23 -
  1688. 53.    PREVAREA
  1689.  
  1690.  
  1691.     PrevArea()
  1692.  
  1693. FUNCTION:
  1694.  
  1695.    Same as previous example but in the reverse direction.
  1696.  
  1697.  
  1698. 54.    VIEWARCHIVE
  1699.  
  1700.  NAME:
  1701.  
  1702.     ViewArchive()
  1703.  
  1704. FUNCTION:
  1705.  
  1706.     Asks the user for a file-number, and then displays the contents of
  1707.     said file to the screen.
  1708.  
  1709.  
  1710. 55.    FILEAREAINFO
  1711.  
  1712.  NAME:
  1713.  
  1714.       FileAreaInfo(args)(a0)
  1715.  
  1716. FUNCTION:
  1717.  
  1718.     Returns various Strings pertaining to that of the FileArea that
  1719.     the user is currently within. Including access to various
  1720.     variables that may at times be required.
  1721.  
  1722. EXAMPLE:
  1723.  
  1724.     totalfiles = FileAreaInfo("TOTALFILES");
  1725.     areanumber = FileAreaInfo("AREANUMBER");
  1726.     position   = FileAreaInfo("FILEPOS");
  1727.     credits    = FileAreaInfo("CREDITS");
  1728.     filesmarked= FileAreaInfo("FILESMARKED");
  1729.  
  1730.  
  1731. RETURNS:
  1732.  
  1733.    Interger items, ..
  1734.  
  1735. SEE-ALSO:
  1736.  
  1737.    AML Variants, and %STRWID. AML command.
  1738.  
  1739.     The same variables can also be displayed to screen more *easily*
  1740.     by using the AML variants. The same token names are used as in the
  1741.     above example, simply applying them in the form of.
  1742.  
  1743.    %TOTALFILES. etc. 
  1744.  
  1745.  
  1746. 56.    FILTERMENU
  1747.  
  1748.  NAME:
  1749.  
  1750.       FilterMenu(cmd)(d0)
  1751.  
  1752. FUNCTION:
  1753.  
  1754.     Gives the user a chance to set up a filter which can then be used
  1755.     to locate files that are 'patternmatched' - Used in conjunction
  1756.     with Global-scanning produces very powerful search criteria.
  1757.  
  1758. EXAMPLE:
  1759.  
  1760.  
  1761.                                 - Page 24 -
  1762. 56.    FILTERMENU
  1763.  
  1764.    FilterMenu(TRUE); /* Enter the Filters menu */
  1765.    
  1766.    FilterMenu(FALSE); /* Clear the Filters, turning them off */
  1767.  
  1768.  
  1769. 57.    FILESTYLE
  1770.  
  1771.  NAME:
  1772.  
  1773.       FileStyle(args)(a0)
  1774.  
  1775. TEMPLATE:
  1776.  
  1777.    "RESET/S,OLD/S,NEW/S"
  1778.  
  1779. FUNCTION:
  1780.  
  1781.     By default the file-area displayer system is user-defaulted by
  1782.     what form of ANSI the user has selected. If they are unable to
  1783.     display ANSI for some reason, or have one or two specific ANSI
  1784.     flags turned off, then they would find the file-displayer would be
  1785.     that of the "old" style BBS display. Other than that they would
  1786.     have the more "newer" and advanced file-display system shown while
  1787.     viewing file descriptions.
  1788.  
  1789.     In some instances it may be wishable to override the "computer"
  1790.     defaulted selection of style to that of the user or sysops choice
  1791.     for a area/section. Maybe contending to only give one selection to
  1792.     users who have fast modems as opposed to slow modems.
  1793.  
  1794.     Whatever the instance, this option allows just that, the
  1795.     overriding of the method used by the selection of your own.
  1796.  
  1797. EXAMPLE:
  1798.  
  1799.    /*
  1800.    ** This example tells the computer to re-compute the
  1801.    ** normal file-area display method for the current
  1802.    ** user, and stick to it until changed.
  1803.    **/
  1804.    FileStyle("RESET");
  1805.  
  1806.    /*
  1807.    ** Both of the following either FORCE the user to have
  1808.    ** the old style of file-display, or the newer more
  1809.    ** advanced display - It may be that you would like
  1810.    ** to use one or the other in part, and then "RESET"
  1811.    ** back to normal after exiting the routine.
  1812.    **/
  1813.    FileStyle("OLD");
  1814.    FileStyle("NEW");
  1815.  
  1816.  
  1817. 58.    FINDDEFAULTBASE
  1818.  
  1819.  NAME:
  1820.  
  1821.       FindDefaultBase(args)(a0)
  1822.  
  1823. TEMPLATE:
  1824.  
  1825.    "START/S,END/S"
  1826.  
  1827. FUNCTION:
  1828.  
  1829.     Internally sets the requested filearea number and returns said
  1830.     value back to caller, yes, in other words it finds out a area that
  1831.     the user has access to in relation to the "start" or "end".
  1832.  
  1833.  
  1834.                                 - Page 25 -
  1835. 58.    FINDDEFAULTBASE
  1836.  
  1837.     This function comes into its own when you wish to take the user to
  1838.     a given file area but know very little about any areas they might
  1839.     have access to. Simply plucking a area number out thin area and
  1840.     using it with various other commands is not the done thing. This
  1841.     command is used to locate a area that hinges on the boundry of
  1842.     either the "first" or the "last" base that the user has access to.
  1843.  
  1844. EXAMPLE:
  1845.  
  1846.    first_base_user_has_access_to = FindDefaultBase("START");
  1847.  
  1848.    last_base_user_has_access_to  = FindDefaultBase("END");
  1849.  
  1850. RETURNS:
  1851.  
  1852.     It will the area number that the user has access amoungst other
  1853.     hidden functions.
  1854.  
  1855.  
  1856. 59.    MAILCMD
  1857.  
  1858.  NAME:
  1859.  
  1860.     MailCmd(args)(a0)
  1861.  
  1862. TEMPLATE:
  1863.  
  1864.    "FEEDBACK/S,HASMAIL/S,SHOWMAIL/S,LIST/N"
  1865.  
  1866. FUNCTION:
  1867.  
  1868.    This function is a multi-caller one, it allows the caller of the command
  1869.    to supply one of a number of argument strings. Depending on the one
  1870.    given, the command will then act out in a different way.
  1871.  
  1872.    FEEDBACK
  1873.    HASMAIL
  1874.    SHOWMAIL
  1875.    LIST       
  1876.  
  1877. EXAMPLE:
  1878.  
  1879.    MailCmd("FEEDBACK");   /* Force user into leaving feedback */
  1880.  
  1881.     /*
  1882.     ** Check if user has mail
  1883.     **/
  1884.    if(MailCmd("HASMAIL"))
  1885.    {
  1886.       /* 
  1887.       ** User has mail
  1888.       **/
  1889.       MailCmd("SHOWMAIL");
  1890.    }
  1891.  
  1892.    MailCmd("LIST 1"); /* Displays Msg area selector, with SIG 1 areas */
  1893.  
  1894. RETURNS:
  1895.  
  1896.    Success - Boolean 0 or 1 (or other, depending on command)
  1897.  
  1898.  
  1899. 60.    LINEEDITOR
  1900.  
  1901.  NAME:
  1902.  
  1903.     LineEditor(quote)(a0)
  1904.  
  1905. FUNCTION:
  1906.  
  1907.                                 - Page 26 -
  1908. 60.    LINEEDITOR
  1909.  
  1910.  
  1911.    Calls the LineEditor - By supplying a filename pointing to a
  1912.    quote file will result in the use of a quote within the editor
  1913.    if the user so wishes.
  1914.  
  1915. EXAMPLE:
  1916.  
  1917.    UBYTE *MsgBuffer=NULL;
  1918.  
  1919.    MsgBuffer = LineEditor("");
  1920.  
  1921.    if(MsgBuffer)
  1922.    {
  1923.       DMsg("This is what you typed in. [Press a key]%WAITKEY.");
  1924.  
  1925.       DMsg(MsgBuffer);
  1926.  
  1927.       /*
  1928.       ** This is REQUIRED to actually free the msg buffer contents.
  1929.       ** It should only be called once you have finished with the
  1930.       ** contents of the message.
  1931.       **/
  1932.       FreeVec(MsgBuffer);
  1933.    }
  1934.    else
  1935.    {
  1936.       DMsg("Didn't bother to write a msg eh..\n");
  1937.    }
  1938.  
  1939. RETURNS:
  1940.  
  1941.    Pointer to buffer used to hold the message contents. Must have
  1942.    a call to FreeVec(Buffer); to free the contents and memory.
  1943.  
  1944.  
  1945. 61.    RUNPARADOOR
  1946.  
  1947.  NAME:
  1948.  
  1949.       RunParaDoor(args)(a0)
  1950.  
  1951. FUNCTION:
  1952.  
  1953.     This allows the running of a Paragon style door. It is sad to say
  1954.     that this interface works much better than the original Paragon
  1955.     door interface in a few key-respects, generally the Paragon door
  1956.     call from StarNet/Paragon does not allow the passing of arguments
  1957.     along to a door. Calling a paragon door allows passing of full
  1958.     arguments, something both Paragon and Starnet never allowed,
  1959.     which is odd.
  1960.  
  1961.  
  1962. EXAMPLE:
  1963.  
  1964.     RunParaDoor("DOORS:SPACEEMPIRE/SPCEMP JOE_BLOGS RELOAD 23");
  1965.  
  1966.     would correctly run the door "DOORS:SPACEEMPIRE/SPCEMP" and pass
  1967.     the rest of the string as arguments along to the door in question,
  1968.     thus allowing newly programmed paragon doors to support arguments.
  1969.  
  1970.  
  1971. 62.    UNFIXEDCMD
  1972.  
  1973.  NAME:
  1974.  
  1975.    UnfixedCmd(args)(a0)
  1976.  
  1977. FUNCTION:
  1978.  
  1979.  
  1980.                                 - Page 27 -
  1981. 62.    UNFIXEDCMD
  1982.  
  1983.    Sometimes test routines are placed here before they are actually
  1984.    supported with a real command. Generally used for Beta testers
  1985.    of commands, so do not be alarmed by the lack of information
  1986.    here.
  1987.  
  1988.  
  1989. 63.    MARKFILE
  1990.  
  1991.  NAME:
  1992.  
  1993.       MarkFile(args)(a0)
  1994.  
  1995. TEMPLATE:
  1996.  
  1997.    "QUERY/S,CLEAR/S" & NO argument.
  1998.  
  1999. FUNCTION:
  2000.  
  2001.     Allows the user to mark a given file, while outside of the file
  2002.     description displayer, but still within a touched index.
  2003.  
  2004. EXAMPLE:
  2005.  
  2006.    /*
  2007.    ** Ask the user to mark a file by giving a number
  2008.    ** etc. of the file in question, to be marked.
  2009.    **/
  2010.    MarkFile("");
  2011.  
  2012.    /*
  2013.    ** Do NOT ask the user to mark a file, but simply Query if
  2014.    ** the user HAS any files marked, returning 1 for Yes,
  2015.    ** and 0 for no.
  2016.    **/
  2017.    got_any_files = MarkFile("QUERY");
  2018.    if(got_any_files) DMsg("We have some files for download Sir..");
  2019.    else              DMsg("We have no files for download, don't you
  2020. know..");
  2021.  
  2022.    /*
  2023.    ** Clears any marked files from the list.
  2024.    **/
  2025.    MarkFile("CLEAR");
  2026.  
  2027. SEE ALSO: 
  2028.  
  2029.    Download()
  2030.  
  2031.  
  2032. 64.    SETSIG
  2033.  
  2034.  NAME:
  2035.  
  2036.    SetSig(args)(a0)
  2037.  
  2038. TEMPLATE:
  2039.  
  2040.    "NEWSIG/N,QUERY/S"
  2041.  
  2042. FUNCTION:
  2043.  
  2044.     Allows the changing of a sig to a value of your choice (0-255),
  2045.     returns either the "previous sig value" or the "current sig value"
  2046.  
  2047. EXAMPLE:
  2048.  
  2049.    /*
  2050.    ** Set the sig value to 2, and store the 'previous' sig value
  2051.    ** in a variable for later 'replacing' if needs be.
  2052.  
  2053.                                 - Page 28 -
  2054. 64.    SETSIG
  2055.  
  2056.    **/
  2057.    old_sig = SetSig("NEWSIG=2");
  2058.  
  2059.    /*
  2060.    ** Find out what the 'current' sig value is
  2061.    ** without actually changing the sig value.
  2062.    **/
  2063.    current_sig = SetSig("QUERY");
  2064.  
  2065.  
  2066. 65.    GETSTATICSTR
  2067.  
  2068.  NAME:
  2069.  
  2070.       GetStaticStr(strnumber)(d0)
  2071.  
  2072. FUNCTION:
  2073.  
  2074.     This will return a string of information back to the caller that
  2075.     is based on the users variables. However, the reason this is a
  2076.     'static' command (data can not be written to..) is that the values
  2077.     returned are computed values. As a example, a date string will be
  2078.     converted from integer data into string format and then returned
  2079.     back, in its raw format it would just be a string of numbers
  2080.     meaning nothing to the caller.
  2081.  
  2082. EXAMPLE:
  2083.  
  2084.     #define LASTDATECALL_STSTR 0
  2085.  
  2086.     strcpy(last_date,GetStaticStr(LASTDATECALL_STSTR));
  2087.     sprintf(buffer,"last date called: %s\n",last_date);
  2088.     DMsg(buffer);
  2089.  
  2090. RETURNS:
  2091.  
  2092.     Various strings depending on the command number given.
  2093.  
  2094. SEE ALSO:
  2095.  
  2096.      ApTClassic Defines 
  2097.  
  2098.     _STSTR defines.
  2099.  
  2100.  
  2101. 66.    GETSTATICVAR
  2102.  
  2103.  NAME:
  2104.  
  2105.     GetStaticVar(varnumber)(d0)
  2106.  
  2107. FUNCTION:
  2108.  
  2109.     This is much the same as the GetStaticStr(..) in that it returns
  2110.     computed values rather than raw data. This differs from that of
  2111.     the GetStaticStr(..) in that it returns integer values rather than
  2112.     strings.
  2113.  
  2114. EXAMPLE:
  2115.  
  2116.     #define DAYS2REVIEW_STVAR     0
  2117.  
  2118.     days2review = GetStaticStr(DAYS2REVIEW_STVAR));
  2119.     sprintf(buffer,"Your account comes up for review in %ld
  2120. days.\n",days2review);
  2121.     DMsg(buffer);
  2122.  
  2123. RETURNS:
  2124.  
  2125.  
  2126.                                 - Page 29 -
  2127. 66.    GETSTATICVAR
  2128.  
  2129.     Various various, such as the birth date, days to review, baud
  2130.     rate,etc.
  2131.  
  2132. SEE-ALSO:
  2133.  
  2134.      ApTClassic Defines 
  2135.    
  2136.     _STVAR defines.
  2137.  
  2138.  
  2139. 67.    GETSTR
  2140.  
  2141.  NAME:
  2142.  
  2143.     GetStr(strnumber)(d0)
  2144.  
  2145. FUNCTION:
  2146.  
  2147.     Returns STRING information pertaining to the current user that is
  2148.     online, more easier to use this command to find information such
  2149.     as name, address, from a user rather than talking directly to the
  2150.     actual user-structure.
  2151.  
  2152. EXAMPLE:
  2153.  
  2154.    #define USERNAME_STR 0
  2155.    #define HANDLE_STR   9
  2156.  
  2157.    UBYTE UsersName[80],Handle[80];
  2158.    
  2159.    strcpy(UserName, GetStr( USERNAME_STR ));
  2160.    DMsg("Your user name is: "); DMsg(UserName); DMsg("\n");
  2161.  
  2162.    strcpy(Handle, GetStr( HANDLE_STR ));
  2163.    DMsg("Your user handle is "); DMsg(Handle); DMsg("\n");
  2164.  
  2165. RETURNS:
  2166.  
  2167.    String information..
  2168.  
  2169. SEE-ALSO:
  2170.  
  2171.     ApTClassic Defines 
  2172.    
  2173.    _STR defines.
  2174.  
  2175.  
  2176. 68.    GETVARIABLE
  2177.  
  2178.  NAME:
  2179.  
  2180.     GetVariable(varnumber)(d0)
  2181.  
  2182. FUNCTION:
  2183.  
  2184.    Returns numeric information based on the users records for the
  2185.    line that you are locked into.
  2186.  
  2187. EXAMPLE:
  2188.  
  2189.    #define ACCESSLEVEL_VAR 0
  2190.    #define CALLSMADE_VAR   2
  2191.  
  2192.    UBYTE Level;
  2193.    ULONG CallsMade;
  2194.  
  2195.    UBYTE Buffer[80];
  2196.  
  2197.    Level     = GetVariable(ACCESSLEVEL_VAR);
  2198.  
  2199.                                 - Page 30 -
  2200. 68.    GETVARIABLE
  2201.  
  2202.    CallsMade = GetVariable(CALLSMMADE_VAR);
  2203.  
  2204.    sprintf(Buffer,"Calls Made:%ld\nAccess Level:%ld\n",
  2205.       CallsMade, Level);
  2206.    DMsg(Buffer);
  2207.  
  2208. RETURNS:
  2209.  
  2210.     Returns various Interger information based on the users
  2211.     information statistics.
  2212.  
  2213. SEE-ALSO:
  2214.  
  2215.      ApTClassic Defines 
  2216.     
  2217.     _VAR defines.
  2218.  
  2219.  
  2220. 69.    LIBERATECMD
  2221.  
  2222.  NAME:
  2223.  
  2224.     LiberateCmd(args)(a0)
  2225.  
  2226.  
  2227. TEMPLATE:
  2228.  
  2229.    "SETUPDLG/S,REMOVEDLG/S"
  2230.  
  2231. FUNCTION:
  2232.  
  2233.    Various commands are not deemed "all important" and are kept within
  2234.    the confined space of the LiberateCmd(..) - depending on the
  2235.    arguments supplied will result in the actions of the command
  2236.    taking place.
  2237.  
  2238. EXAMPLE:
  2239.  
  2240.    LiberateCmd("SETUPDLG");
  2241.  
  2242.    This converts various information from ApT to that of DLG variants.
  2243.    This allows 'certain' DLG based doors to run that require minimum
  2244.    information.
  2245.  
  2246.    LiberateCmd("REMOVEDLG");
  2247.  
  2248.    Removes information created for the use of the DLG utilities.
  2249.  
  2250.    Normally the SETUPDLG command is placed within your Interlogin
  2251.    sequence and a following REMOVEDLG at some logoff stage, either
  2252.    in rexx or in coded form.
  2253.  
  2254. RETURNS:
  2255.  
  2256.  
  2257. 70.    Contacting Technical Support
  2258.  
  2259.  Before contacting Technical Support, you should have the following:
  2260.  
  2261.          - Your registration number
  2262.          - Your version number
  2263.          - A complete and succinct problem description
  2264.          - A list of which compiler and linker options you are using
  2265.          - A list of which parts of the product that you have problems with
  2266.  
  2267. To contact Technical Support, call:
  2268.  
  2269.    In the UK, Manchester,   (+44) (0)161-799-4922  (BBS)
  2270.  
  2271.  
  2272.                                 - Page 31 -
  2273. 70.    Contacting Technical Support
  2274.  
  2275.    In the UK, Scotland,     (+44) (0)1501-44262    (BBS)
  2276.  
  2277.    NetMail 2:250/120, 2:259/13
  2278.  
  2279.    Our Internet sites: -
  2280.  
  2281.    andy@nwnet.demon.co.uk
  2282.  
  2283.    dave@aptsoft.compulink.co.uk
  2284.  
  2285.    ApT-BBS Support Echo.
  2286.  
  2287. 71.    DEVELOPERS_GUIDELINES
  2288.  
  2289.  Developers are required to pass on all programs that are released, both as
  2290. Shareware and Public Domain to ApT-Design.  This allows the gathering of a
  2291. actual catalogue of all software that will be released, postings made known
  2292. to various support systems, all resulting in users hearing about new
  2293. developed products and updated products.
  2294.  
  2295. The main area where we would like to see developers aim their efforts is
  2296. within the Utilities area.
  2297.  
  2298. Anything that is released as Shareware should have any form of initial
  2299. Banner removed from both the start and the end of the program in question.
  2300. If Banners are required to be placed within the program, thus indicating
  2301. it's origins and where support can be found, it would be wise to place this
  2302. within some form of About screen that can only be accessed under the users
  2303. wishes.
  2304.  
  2305. The above is also recommended for PD software.
  2306.  
  2307. All software that is not firstly shown to ApT-Design before release will not
  2308. get the, so called, "ApT-BBS Seal of Approval, also failing to be included
  2309. within full catalogue list of external modules/utilities.
  2310.  
  2311.  
  2312. 72.    WHICH_EDITOR
  2313.  
  2314.  Most of the commands used to access the various library functions require
  2315. "case shifting", basically meaning that command functions are very rarely
  2316. lowercase. For this we recommend that a editor is used that allows for the
  2317. correction of cases, generally done when the cursor leaves the line that you
  2318. are writing.
  2319.  
  2320. As a small example:
  2321.  
  2322. if(Wishing)
  2323.    dmsg("I love Lucy..");
  2324.  
  2325. After the cursor finishes with the 'dmsg("I love Lucy..");' - the line would
  2326. be scanned and have it's case changed into.
  2327.  
  2328.  
  2329.    DMsg("I love Lucy..");
  2330.  
  2331. You are always required in such editors to enter your own dictionary
  2332. commands, but it serves developers best if the time and effort is taken to
  2333. do so, life will be that bit easier.
  2334.  
  2335. The Following list of editors all can correct cases:
  2336.  
  2337. Turbotext ..... Commercial Edge .......... Commercial GoldED ........
  2338. Shareware (recommended overall editor)
  2339.  
  2340. Popular Editor that sadly can not correct cases as of 3.05 and below.
  2341.  
  2342. CygnusED Pro .. Commercial.
  2343.  
  2344.  
  2345.                                 - Page 32 -
  2346. 72.    WHICH_EDITOR
  2347.  
  2348.  
  2349. 73.    SETSTR
  2350.  
  2351.  NAME:
  2352.  
  2353.    SetStr(varnumber,string)(d0,a0)
  2354.  
  2355. FUNCTION:
  2356.  
  2357.    Stores the required string into the users information folder.
  2358.    This allows for a easy method of storing STRING information
  2359.    within a users folder without needing to be bothered with
  2360.    the actual pointer to the memory contained folder.
  2361.  
  2362. EXAMPLE:
  2363.  
  2364.    #define HANDLE_STR   9
  2365.    
  2366.    SetStr(HANDLE_STR,"The Liberator");
  2367.  
  2368.    Has the effect of storing the supplied handle within the users
  2369.    folder.
  2370.    
  2371.    The alternative would have been something like:
  2372.  
  2373.    strcpy(udat->us_alias,"The Liberator");
  2374.  
  2375.    However, the latter one does NOT monitor for the size of the
  2376.    string and will overwrite if a string that is too large is
  2377.    given. The SetStr(..,..) command is far more powerful and
  2378.    makes quite sure that nothing out of bounds is ever stored.
  2379.  
  2380.    For this reason it is recommended to use the SetStr and
  2381.    SetVariable commands.
  2382.  
  2383. SEE-ALSO:
  2384.  
  2385.     ApTClassic Defines 
  2386.  
  2387.    _STR defines.
  2388.  
  2389.  
  2390. 74.    SETVAR
  2391.  
  2392.  NAME:
  2393.  
  2394.    SetVariable(varnumber,value)(d0,d1)
  2395.  
  2396. FUNCTION:
  2397.  
  2398.    Stores the required Variable into the users information folder.
  2399.    This allows for a easy method of storing NUMERIC information
  2400.    within a users folder, without needing to be bothered with
  2401.    the actual pointer to the memory contained folder.
  2402.  
  2403. EXAMPLE:
  2404.  
  2405.    #define CALLSMADE_VAR   2
  2406.    
  2407.    SetVariable(CALLSMADE_VAR, 201);
  2408.  
  2409.    Has the effect of storing the 201 integer variable within the
  2410.    users folder pertaining to the number of calls made.
  2411.  
  2412.    The alternative would have been something like:
  2413.  
  2414.    udat->us_calls = 201;
  2415.  
  2416.  
  2417.                                 - Page 33 -
  2418. 74.    SETVAR
  2419.  
  2420. SEE-ALSO:
  2421.  
  2422.     ApTClassic Defines 
  2423.  
  2424.    _VAR defines.
  2425.  
  2426.  
  2427. 75.    ROBOMSG
  2428.  
  2429.  NAME:
  2430.  
  2431.     RoboMsg(Arguments)(a0)
  2432.  
  2433. TEMPLATE:
  2434.  
  2435.    "B=BODY/A/K,A=AREA/A/N,T=TO/A/K,F=FROM/A/K,S=SUBJECT/A/K,P=PRIVATE/K/S,U=
  2436. UPLOAD/S"
  2437.  
  2438. FUNCTION:
  2439.  
  2440.     Allows the posting of messages without the need to be connected to
  2441.     a given line , .
  2442.  
  2443. EXAMPLE:
  2444.  
  2445.       /*
  2446.       ** It should be noted to "new" programmers that the laws of 'C'
  2447.       ** require that speechmarks within a encased " ... " require that
  2448.       ** they be prefixed with a \ sign, this is replaced at compile
  2449.       ** time with the actual " sign. So,
  2450.       ** UBYTE *MyString = "Hello \"Sir George\"";
  2451.       ** dmsg(MyString);
  2452.       **
  2453.       ** Hello "Sir George"
  2454.       **
  2455.       **/
  2456.                 RoboMsg("B=ram:Body.txt A=1 TO=\"Andy Grifo\" F=\"Dave
  2457. McIntosh\" S=Life");
  2458.  
  2459.       arguments becomes..
  2460.  
  2461.       B=ram:Body.txt A=1 TO="Andy Grifo" F="Dave McIntosh" S=Life
  2462.  
  2463.       and the message is posted to Area 1 etc..
  2464.  
  2465.  
  2466. 76.    FLAGCMD
  2467.  
  2468.  NAME:
  2469.  
  2470.     FlagCmd(flagptr,Arguments)(a0,a1)
  2471.  
  2472. TEMPLATE:
  2473.  
  2474.    "TEST/K/N,SET/K/N,CLR/K/N,BYTE/S,WORD/S,LONG/S"
  2475.  
  2476. FUNCTION:
  2477.  
  2478.     Allows easy manipulation of BIT's, the actual flag pointer can
  2479.     pointer to any size of "contained" flags.
  2480.  
  2481.  
  2482.     The one thing to note is that you have to tell the command what
  2483.     the length of the bit "container" actually is. In the following
  2484.     instances listed within the example(s) the container is a
  2485.     ULONG, so one would denote that the container is a LONG. If,
  2486.     for example bits are being defined as:
  2487.  
  2488.     UBYTE MyFlags[32]; //; 32 * 8 = 256 Flags
  2489.  
  2490.                                 - Page 34 -
  2491. 76.    FLAGCMD
  2492.  
  2493.  
  2494.     and all references within the FlagCmd() would have BYTE as possibly
  2495.     the last argument.
  2496.  
  2497. EXAMPLE:
  2498.  
  2499.     flag_50 = FlagCmd((APTR *)udat->us_setupflags,"TEST 50 LONG");
  2500.  
  2501.     if(flag_50)
  2502.     {
  2503.       DMsg("Flag 50 is set within the us_setupflags\n");
  2504.     }
  2505.     else
  2506.     {
  2507.       DMsg("Flag 50 is NOT set, .. within the us_setupflags\n");
  2508.     }
  2509.  
  2510.  
  2511.  
  2512.     or
  2513.  
  2514.  
  2515.  
  2516.     ULONG MyFlags[16];  //; 16 * 32 = 512 flags (0-511)
  2517.  
  2518.     FlagCmd((APTR *)&MyFlags,"SET 0 LONG");
  2519.     FlagCmd((APTR *)&MyFlags,"SET 1 LONG");
  2520.  
  2521.  
  2522. RETURNS:
  2523.  
  2524.    Returns TRUE/FALSE denoting the form that the flag spcified is
  2525.    set to, only, that is, if you are TESTing for it.
  2526.  
  2527.  
  2528. 77.    FILESIZE
  2529.  
  2530.  NAME:
  2531.  
  2532.     Size = FileSize(filename)(a0)
  2533.  
  2534. FUNCTION:
  2535.  
  2536.     Quite simply returns the size of a filename that is given.
  2537.  
  2538. EXAMPLE:
  2539.  
  2540.     if(FileSize("t:myfile"))
  2541.     {
  2542.        File exists..
  2543.  
  2544.        .
  2545.  
  2546.        .
  2547.  
  2548.        Go on to open the file and do with it what we will..
  2549.  
  2550.        .
  2551.  
  2552.        .
  2553.  
  2554.     }
  2555.  
  2556.     or
  2557.  
  2558.     ULONG fsize;
  2559.  
  2560.     fsize = FileSize("ram:someonesfile");
  2561.  
  2562.                                 - Page 35 -
  2563. 77.    FILESIZE
  2564.  
  2565.  
  2566.     DMsgf("the size of that ugly 'ram:someonesfile' is '%ld'
  2567. bytes.\n",fsize);
  2568.  
  2569.  
  2570. RETURNS:
  2571.  
  2572.     Size of the file, or NULL if file does not exist.
  2573.  
  2574.  
  2575. 78.    MOVEUSER
  2576.  
  2577.  NAME:
  2578.  
  2579.     Success = MoveUser(accountname,kind)(a0,d0)
  2580.  
  2581. FUNCTION:
  2582.  
  2583.     Moves a users account, whose name is supplied, to one of three
  2584.     possible directories: Users, NewUsers/ , Review/
  2585.  
  2586. EXAMPLE:
  2587.  
  2588.     if(HasExpired())
  2589.     {
  2590.       MoveUser(udat->us_name,USER_REVIEW);
  2591.       ShowTpl("review/review");
  2592.       DropLine();
  2593.     }
  2594.  
  2595. NOTE:
  2596.  
  2597.    Care should be taken when moving a user who might be online. It
  2598.    is generally recommended that users who are online are only moved
  2599.    as soon as they have enteried their names and are inside the
  2600.    acutal interlog portion of the system, to which the line should
  2601.    be dropped soon after.
  2602.  
  2603. RETURNS:
  2604.  
  2605.    Success is TRUE.
  2606.  
  2607.  
  2608. 79.    GETUSERFROMDIR
  2609.  
  2610.  NAME:
  2611.  
  2612.     AccountVariable = GetUserFromDir(Accountname,DestinationString)(a0,a1)
  2613.  
  2614. FUNCTION:
  2615.  
  2616.     Finds out which directory a given user is actually being contained
  2617.     within. Generally the string that is placed in "Destination" is
  2618.     the full directory as in: "ApT:Users" or "ApT:NewUsers" etc. and
  2619.     no '/' sign is added, this is for you yourself to do, so take
  2620.     note to add it if required.
  2621.  
  2622. EXAMPLE:
  2623.  
  2624.     UBYTE buffer[80];
  2625.  
  2626.     if(GetUserDir("Joe Bloggs",buffer))
  2627.     {
  2628.        .
  2629.        .
  2630.  
  2631.        DMsgf("Joe Bloggs resides within:%s directory\n",buffer);
  2632.     }
  2633.  
  2634.  
  2635.                                 - Page 36 -
  2636. 79.    GETUSERFROMDIR
  2637.  
  2638. RETURNS:
  2639.  
  2640.    The 'variable' that is returned is the directory 'value' that is
  2641.    defined within the includes. i.e the same form as USER_REVIEW,
  2642.    USER_MEMBER, etc. ~0 denotes failure, .
  2643.  
  2644.  
  2645. 80.    UNDERSCORE
  2646.  
  2647.  NAME:
  2648.  
  2649.     String = Underscore(String)(a0)
  2650.  
  2651. FUNCTION:
  2652.  
  2653.     Quite often it is required to have a string "underscored", which
  2654.     means that a string such as , "Hello World, I was here", would
  2655.     become, "Hello_World,_I_was_here", which comes into it's own
  2656.     more than anything when dealing with users account directory
  2657.     names etc.
  2658.  
  2659.     It should be noted that the string you supply is the actual
  2660.     string that is converted, so it is not the done thing to
  2661.     underscore "direct" pointers to the users account name, but
  2662.     firstly copy them and work on a buffer.
  2663.  
  2664. EXAMPLE:
  2665.  
  2666.     UBYTE buffer[80],todo[80];
  2667.  
  2668.     strcpy(todo,udat->us_name);
  2669.  
  2670.     Underscore(todo);
  2671.  
  2672.     DMsgf("Your name, underscored, is %s\n",todo);
  2673.  
  2674. RETURNS:
  2675.  
  2676.    The newly converted string is returned.
  2677.  
  2678.  
  2679. 81.    LOADFILE
  2680.  
  2681.  NAME:
  2682.  
  2683.     success = LoadFile(filename,buffer,filesize)(a0,a1,d0)
  2684.  
  2685. FUNCTION:
  2686.  
  2687.     Fast and simple to use LoadFile command, takes care of everything
  2688.     that could be required in the opening and loading in of a files
  2689.     contents.
  2690.  
  2691. EXAMPLE:
  2692.  
  2693.     LONG fsize = FileSize("t:datablock.dat");
  2694.  
  2695.     if(fsize)
  2696.     {
  2697.        UBYTE *blockbuffer=NULL;
  2698.  
  2699.        blockbuffer = AllocVec(fsize,MEMF_CLEAR);
  2700.  
  2701.        if(blockbuffer)
  2702.        {
  2703.           if(LoadFile("t:datablock.dat",blockbuffer,fsize))
  2704.           {
  2705.  
  2706.             .
  2707.  
  2708.                                 - Page 37 -
  2709. 81.    LOADFILE
  2710.  
  2711.  
  2712.             .
  2713.  
  2714.             Do ones thing..
  2715.  
  2716.             .
  2717.  
  2718.           }
  2719.  
  2720.           FreeVec(blockbuffer);
  2721.        }
  2722.     }
  2723.  
  2724. RETURNS:
  2725.  
  2726.    Success is TRUE
  2727.  
  2728.  
  2729. 82.    LOADACCOUNT
  2730.  
  2731.  NAME:
  2732.  
  2733.     struct UserInfo * = LoadAccount(account,kind)(a0,d0)
  2734.  
  2735. FUNCTION:
  2736.  
  2737.     Loads in a users account, passes a pointer back to contents
  2738.     of the users folder.
  2739.  
  2740. EXAMPLE:
  2741.  
  2742.     /*
  2743.     ** Assuming we know for sure that 'Joe Bloggs' resides within
  2744.     ** the apt:users/ directory.
  2745.     **/
  2746.  
  2747.     struct UserInfo *uinfo=NULL;
  2748.  
  2749.     uinfo = LoadAccount("Joe Bloggs",USER_MEMBER);
  2750.  
  2751.     if(uinfo)
  2752.     {
  2753.       DMsgf("actual account name is:%s\n",uinfo->us_name);
  2754.  
  2755.       DMsgf("actual handle is      :%s\n",uinfo->us_alias);
  2756.  
  2757.       FreeVec(uinfo);
  2758.     }
  2759.  
  2760. RETURNS:
  2761.  
  2762.    Pointer to the users account folder - This *MUST* be FreeVec()'ed
  2763.    after use, otherwise memory will not be returned back to the system.
  2764.  
  2765.  
  2766. 83.    SAVEACCOUNT
  2767.  
  2768.  NAME:
  2769.  
  2770.     Success = SaveAccount(accountname,UserInfo,kind)(a0,a1,d0)
  2771.  
  2772. FUNCTION:
  2773.  
  2774.     Saves users folder that has been contained within memory, either
  2775.     from the returned pointer given from the LoadAccount command,
  2776.     or otherwise.
  2777.  
  2778. EXAMPLE:
  2779.  
  2780.  
  2781.                                 - Page 38 -
  2782. 83.    SAVEACCOUNT
  2783.  
  2784.     /*
  2785.     ** Assuming we know for sure that 'Joe Bloggs' resides within
  2786.     ** the apt:users/ and we wish to re-write him back to that
  2787.     ** directory, and also that we have been given a pointer from
  2788.     ** the LoadAccount command that pertains to his account, .
  2789.     **/
  2790.  
  2791.     .
  2792.  
  2793.     .
  2794.  
  2795.     .
  2796.  
  2797.     SaveAccount("Joe Bloggs",uinfo,USER_MEMBER);
  2798.  
  2799. RETURNS:
  2800.  
  2801.     Success on save is TRUE
  2802.  
  2803.  
  2804. 84.    MOVEFILE
  2805.  
  2806.  NAME:
  2807.  
  2808.     Success = MoveFile(src,dst)(a0,a1)
  2809.  
  2810. FUNCTION:
  2811.  
  2812.     Moves a file fromone directory to another, ..
  2813.  
  2814. EXAMPLE:
  2815.  
  2816.     MoveFile("ram:dir1/file","ram:dir2/file");
  2817.  
  2818. RETURNS:
  2819.  
  2820.     Success on move is TRUE
  2821.  
  2822.  
  2823. 85.    APPLYTEMPLATE
  2824.  
  2825.  NAME:
  2826.  
  2827.     Success = ApplyTemplate(TemplateName, UserInfo *ui)(a0,a1)
  2828.  
  2829. FUNCTION:
  2830.  
  2831.     Applies a given "template transpose" file into the supplied 'UserInfo'
  2832.     structure.
  2833.  
  2834.     This can be used in such instances in gaining a pointer to a user who
  2835.     might be online and "tansposing" his account with a fresh template.
  2836.     There are many many instances when this function could be used.
  2837.  
  2838. EXAMPLE:
  2839.  
  2840.     ApplyTemplate("FullMember",udat);
  2841.  
  2842.     would apply the template:
  2843.  
  2844.     TPlates:UserTemplates/FullMember.TRP
  2845.  
  2846. RETURNS:
  2847.  
  2848.     Success TRUE or FALSE
  2849.  
  2850.  
  2851. 86.    INFORM
  2852.  
  2853.  NAME:
  2854.  
  2855.                                 - Page 39 -
  2856. 86.    INFORM
  2857.  
  2858.  
  2859.     Inform(String)(a0)
  2860.  
  2861. FUNCTION:
  2862.  
  2863.     Updates the "User is doing.." portion of the ApT-Server - This string
  2864.     can also be seen if "another user" requests a "Who is online" option.
  2865.     They would see various information along with a portion of this string
  2866.     (depending on the set width..) - This being the case it is sometimes
  2867.     worth keeping the string as brief as possible.
  2868.  
  2869. EXAMPLE:
  2870.  
  2871.     Inform("Files"); /* User has entered the files area... */
  2872.  
  2873.     Inform("Games"); /* User has entered the games area... */
  2874.  
  2875.     Inform("Playing Hack & Slash");
  2876.  
  2877. RETURNS:
  2878.  
  2879.     VOID
  2880.  
  2881.  
  2882. 87.    GETLIVECHAR
  2883.  
  2884.  NAME:
  2885.  
  2886.     GetLiveChar()
  2887.  
  2888. FUNCTION:
  2889.  
  2890.     This works exactly the same as the GetChar() option but with the
  2891.     difference that it does not "wait" for a key to be pressed before
  2892.     returning. Rather, it will return no matter if a key has been pressed.
  2893.  
  2894.     This can be good for instances when a program is "doing a task" that
  2895.     the user may wish to abort out of. So checking for ^C's or S (for stop)
  2896.     could do this task.
  2897.  
  2898.     It's other advantage could be for games.
  2899.  
  2900.  
  2901. EXAMPLE:
  2902.  
  2903.     Key = GetLiveChar();
  2904.  
  2905. RETURNS:
  2906.  
  2907.    Character or NULL (for no character typed)
  2908.  
  2909.  
  2910. 88.    GETTIMEDCHAR
  2911.  
  2912.  NAME:
  2913.  
  2914.     GetTimedChar(Tics)
  2915.  
  2916. FUNCTION:
  2917.  
  2918.     This option is rather like combining both the "GetChar()" and
  2919.     "GetLiveChar()" together. It allows you to set a "timeout" value
  2920.     which will result in the command waiting for a key to be pressed,
  2921.     but IF it is not pressed within X amounts of tics, return back
  2922.     to you. This allows you to do many various exciting things ..
  2923.  
  2924.     This allows for you to, in a way, multitask your programs.
  2925.  
  2926.     It is useful for such tasks as having (what we call) "Multitasking
  2927.  
  2928.                                 - Page 40 -
  2929. 88.    GETTIMEDCHAR
  2930.  
  2931.     Menus" (menus that are updated after x amounts of inactivity from
  2932.     the user) as well as many other instances.
  2933.  
  2934.     With a lot of thought this option can achieve many goals.
  2935.  
  2936.     TICS = 50 tics are equal to 1 second.
  2937.  
  2938. EXAMPLE:
  2939.  
  2940.     Key = GetTimedChar(50*4); /* Timeout after 4 seconds.. */
  2941.  
  2942.     if(Key)
  2943.     {
  2944.       DMsgf("\nYou pressed the '%c' key!\n",Key);
  2945.     }
  2946.     else
  2947.     {
  2948.       DMsg("\nBaggh, you just sat there doing nothing! No keypress!!\n");
  2949.     }
  2950.  
  2951. RETURNS:
  2952.  
  2953.    Character or NULL (for no character typed)
  2954.  
  2955.  
  2956. 89.    SHOWRAWFILE
  2957.  
  2958.  NAME:
  2959.  
  2960.     ShowRawFile(filename)
  2961.  
  2962. FUNCTION:
  2963.  
  2964.     Displays a file to the screen with NO interpreting of AML codes. This
  2965.     purely shows a file "as it was intended"
  2966.  
  2967. EXAMPLE:
  2968.  
  2969.     ShowRawFile("t:things.txt");
  2970.  
  2971.  
  2972. 90.    HASACCESS
  2973.  
  2974.  NAME:
  2975.  
  2976.     Success = HasAccess(Groups)
  2977.  
  2978. FUNCTION:
  2979.  
  2980.     Allows you to check if the user falls within a specific access group.
  2981.  
  2982. EXAMPLE:
  2983.  
  2984.     if(HasAccess("5,10,15,20"))
  2985.     {
  2986.       DMsg("Your level must be either 5,10,15 or 20!");
  2987.     }
  2988.  
  2989.     if(HasAccess("20-50,255"))
  2990.     {
  2991.       DMsg("Your level must be in the range of 20-50 or 255!");
  2992.     }
  2993.  
  2994.     if(HasAccess("10,90-100,63,29"))
  2995.     {
  2996.       DMsg("Your level must be, 10 90 to 100, 63 or 29!");
  2997.     }
  2998.  
  2999.  
  3000.  
  3001.                                 - Page 41 -
  3002. 90.    HASACCESS
  3003.  
  3004. RETURNS:
  3005.  
  3006.    Success = TRUE or FALSE
  3007.  
  3008.  
  3009. 91.    SMALLED
  3010.  
  3011.  NAME:
  3012.  
  3013.     Pointer = SmallED(lines)
  3014.  
  3015. FUNCTION:
  3016.  
  3017.    This command is rather interesting in that it has a lot of possibilities
  3018.    for the future as well as the present, such as allowing easy OLM (on
  3019. line
  3020.    messaging) to other users on other lines, as well as many various other
  3021.    uses.  The first thing to understand about it is that it is, kind of, a
  3022.    small simple text-editor that is still quite advanced in it's use, while
  3023.    still remaining simple.  It allows for full "backspacing" onto PREVIOUS
  3024.    lines and will only abort when RETURN is pressed and STICK when the
  3025. maximum
  3026.    line has been reached. It is ideal for gathering questionair style
  3027.    information from users as well as MANY other uses.
  3028.  
  3029.    YOU MUST "FreeVec" the pointer that is supplied (as long as it is
  3030.    not NULL) - This frees the memory containing the text.
  3031.  
  3032. EXAMPLE:
  3033.  
  3034.     UBYTE *Pointer=NULL;
  3035.  
  3036.     Pointer = SmallED(10);
  3037.  
  3038.     if(Pointer)
  3039.     {
  3040.       DMsg("Press a key to view what you typed:%WAITKEY\n\n");
  3041.       DMsg(Pointer);
  3042.       FreeVec(Pointer);
  3043.     }
  3044.  
  3045. RETURNS:
  3046.  
  3047.    Pointer to the text OR NULL (for failure or no text)
  3048.  
  3049. NOTES:
  3050.  
  3051.    The pointer MUST be FreeVec(Pointer); IF a pointer is returned.
  3052.  
  3053.  
  3054. 92.    CENTRESTRING
  3055.  
  3056.  NAME:
  3057.  
  3058.     Pointer = CentreString(Destination, Source);
  3059.  
  3060. FUNCTION:
  3061.  
  3062.     Takes a String and centres it according to the users screen width,
  3063. placing
  3064.     it within the supplied Destination buffer, as well as returning a
  3065. pointer
  3066.     to this buffer.
  3067.  
  3068.     The string must be PURE in that it has no embedded control or AML
  3069. codes.
  3070.  
  3071. EXAMPLE:
  3072.  
  3073.  
  3074.                                 - Page 42 -
  3075. 92.    CENTRESTRING
  3076.  
  3077.     UBYTE Destination[100];
  3078.  
  3079.     CentreString(Destination,"Charmed I'm Sure");
  3080.  
  3081.     DMsgf("\n%s\n",Destination);
  3082.  
  3083. RETURNS:
  3084.  
  3085.    Pointer to the Destination
  3086.  
  3087.